package com.sunshine.wrongquestionset.utils

import java.util.*

/**
 * @author sunshine
 * @date 2021/4/11
 * 时间工具类
 */
object TimeUtils {

    /**
     * 计算两天之差
     */
    fun dateDifference(oldTime: Long, nowTime: Long): Int {
        return ((nowTime - oldTime) / DAY_LONG).toInt()
    }

    fun getNowTime(): Long {
        return Date().time
    }

    const val DAY_LONG: Long = 24 * 60 * 60 * 1000L
}